package com.dotc.internationdemo

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.ActionBar
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.dotc.internationdemo.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

    var binding: ActivityMainBinding? = null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
        val actionBar: ActionBar? = supportActionBar
        if (actionBar != null) {
            actionBar.setTitle(R.string.app_name)
        }
    }

    fun onClick(view: View) {
        when (view.id) {
            R.id.btn_change_language -> ChangeLanguageActivity.launch(this)
            R.id.btn_auto_set_text_size -> AutoResetTextSizeActivity.launch(this)
            else -> {
            }
        }
    }
}